<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>实时交互工具</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/login.css">

   <script type="text/javascript">
   function check()
   {
   if(document.loginform.username.value=='')
   {
        alert("用户名不能为空!");
	   document.loginform.username.focus();
	   return false;
   }
   else if(document.loginform.password.value=='')
   {
        alert("密码不能为空!");
	   document.loginform.password.focus();
	   return false;
   }
   else
   return true;
   }
   </script>
  </head>
  
  <body> 
      <h1 align="center"><font color="#c0c0c0">实时交互工具</font></h1>
      <br/>
      <br/>
      <form name="loginform" method="post" action="LoginServlet" onSubmit="return check()">
                用户名:<input type="text" name="username" size="19"><br><br>
                密码:  <input type="password" name="password" size="20"><br><br>
             <input type="submit" value="登录">
             <input type="reset" value="重置">
      </form>
      <br>
      <a href="register.jsp">注册新用户</a>
  </body>
</html>
